import request from '@/utils/request'

// 查询成员信息列表
export function listMember(query) {
  return request({
    url: '/ndpf/member/list',
    method: 'get',
    params: query
  })
}

// 查询成员信息详细
export function getMember(memberId) {
  return request({
    url: '/ndpf/member/' + memberId,
    method: 'get'
  })
}

// 新增成员信息
export function addMember(data) {
  return request({
    url: '/ndpf/member',
    method: 'post',
    data: data
  })
}

// 修改成员信息
export function updateMember(data) {
  return request({
    url: '/ndpf/member',
    method: 'put',
    data: data
  })
}

// 删除成员信息
export function delMember(memberId) {
  return request({
    url: '/ndpf/member/' + memberId,
    method: 'delete'
  })
}

// 查询团体成员信息列表
export function listTeamMember(query) {
  return request({
    url: '/ndpf/member/teamMemberList',
    method: 'get',
    params: query
  })
}


// 查询团体成员信息列表
export function listAllTeamMember(query) {
  return request({
    url: '/ndpf/member/allTeamMemberList',
    method: 'get',
    params: query
  })
}

// 查询团体分组成员信息列表
export function listTeamGroupMember(query) {
  return request({
    url: '/ndpf/member/teamGroupMemberList',
    method: 'get',
    params: query
  })
}

// 删除成员信息
export function delTeamMember(data) {
  return request({
    url: '/ndpf/teamMember/delTeamMember',
    method: 'delete',
    data: data
  })
}

// 审批成员通过
export function examinePrePass(teamMemberId) {
  return request({
    url: '/ndpf/teamMember/examinePrePass/' + teamMemberId,
    method: 'put'
  })
}


// 审批成员通过
export function examinePass(teamMemberId) {
  return request({
    url: '/ndpf/teamMember/examinePass/' + teamMemberId,
    method: 'put'
  })
}

// 审批成员通过
export function examineRefuse(teamMemberId) {
  return request({
    url: '/ndpf/teamMember/examineRefuse/' + teamMemberId,
    method: 'put'
  })
}


// 查询团队成员信息列表
export function findClTeamMember(query) {
  return request({
    url: '/ndpf/member/findClTeamMember',
    method: 'get',
    params: query
  })
}